package com.ruoyi.dj.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.dj.domain.Rhtxdj;
import com.ruoyi.dj.domain.vo.RhtxdjVo;
import com.ruoyi.dj.mapper.RhtxdjMapper;
import com.ruoyi.dj.service.IRhtxdjService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 融合通信点检Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-24
 */
@Service
public class RhtxdjServiceImpl implements IRhtxdjService
{
    @Autowired
    private RhtxdjMapper rhtxdjMapper;

    /**
     * 查询融合通信点检
     *
     * @param id 融合通信点检主键
     * @return 融合通信点检
     */
    @Override
    public Rhtxdj selectRhtxdjById(Long id)
    {
        return rhtxdjMapper.selectRhtxdjById(id);
    }

    /**
     * 查询融合通信点检列表
     *
     * @param rhtxdj 融合通信点检
     * @return 融合通信点检
     */
    @Override
    public List<Rhtxdj> selectRhtxdjList(RhtxdjVo rhtxdjVo)
    {
        return rhtxdjMapper.selectRhtxdjList(rhtxdjVo);
    }

    /**
     * 新增融合通信点检
     *
     * @param rhtxdj 融合通信点检
     * @return 结果
     */
    @Override
    public int insertRhtxdj(Rhtxdj rhtxdj)
    {
        rhtxdj.setCreateTime(DateUtils.getNowDate());
        int i = rhtxdjMapper.insertRhtxdj(rhtxdj);
        return i;
    }

    /**
     * 修改融合通信点检
     *
     * @param rhtxdj 融合通信点检
     * @return 结果
     */
    @Override
    public int updateRhtxdj(Rhtxdj rhtxdj)
    {
        rhtxdj.setUpdateTime(DateUtils.getNowDate());
        return rhtxdjMapper.updateRhtxdj(rhtxdj);
    }

    /**
     * 批量删除融合通信点检
     *
     * @param ids 需要删除的融合通信点检主键
     * @return 结果
     */
    @Override
    public int deleteRhtxdjByIds(Long[] ids)
    {
        return rhtxdjMapper.deleteRhtxdjByIds(ids);
    }

    /**
     * 删除融合通信点检信息
     *
     * @param id 融合通信点检主键
     * @return 结果
     */
    @Override
    public int deleteRhtxdjById(Long id)
    {
        return rhtxdjMapper.deleteRhtxdjById(id);
    }


}